﻿using System;
using System.Collections.Generic;

    class NumAppear
    {
        static int NumFreqAppear(int[] arr, int num)
        {
            int count = 0;
            
            for (int i = 0; i < arr.Length; i++)
            {
                if (arr[i] == num)
                {
                    count++;
                }
            }
            Console.WriteLine("The number {0} appears {1} times in the array", num, count);
            return count;
        }

        static void Main(string[] args)
        {
            int[] arr = { 1, 2, 4, 5, 5, 4, 3, 6, 7, 8, 9, 5 };
            int num = 5;
            
           NumFreqAppear(arr, num);
        }
    }

